package com.zidian.study.activity;

import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.zidian.study.globa.ToolBarActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import com.zidian.student.trucks.R;

/**
 * Created by Administrator on 2016/9/treasure_chest16 0016.
 * 就业问卷界面
 */
public class JobsQuestionActivity extends ToolBarActivity {
    @Bind(R.id.webView1)
    WebView webView;
    private String url;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setToolbarView(R.layout.toolbar_left);
        setContentView(R.layout.activity_jobs_activity);
        ButterKnife.bind(this);

        url = getIntent().getStringExtra("url");
        initView();

    }

    private void initView() {
        webView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });

        webView.loadUrl(url);

        WebSettings webSettings = webView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        webSettings.setUseWideViewPort(true);//设置此属性，可任意比例缩放
        webSettings.setLoadWithOverviewMode(true);
        webSettings.setBuiltInZoomControls(true);
        webSettings.setSupportZoom(true);
        webView.requestFocusFromTouch();


    }


}
